package net.chathu.airgw.util 
{
	/**
	 * ...
	 * @author ze
	 */
	public class IRCColors 
	{

		private static const defaultColorMap:Array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
		private static const colorMap:Array;
		
		public function IRCColors() 
		{
			
		}
		
		public static function changeColorMap(newMap:Array):void {
			if (newMap && newMap.length == 16)
			{
				colorMap = newMap;
			} else {
				colorMap = null;
			}
		}
		
		private static function getColor(index:int):int {
			if (colorMap) {
				return colorMap[index];
			} else {
				return defaultColorMap[index];
			}
		}
		
		public static function get WHITE():int {
			return getColor(0);
		}
		
		public static function get BLACK():int {
			return getColor(1);
		}
		
		public static function get BLUE_NAVY():int {
			return getColor(2);
		}
		
		public static function get GREEN():int {
			return getColor(3);
		}
		
		public static function get RED():int {
			return getColor(4);
		}
		
		public static function get BROWN():int {
			return getColor(5);
		}
		
		public static function get PURPLE():int {
			return getColor(6);
		}
		
		public static function get ORANGE():int {
			return getColor(7);
		}
		
		public static function get YELLOW():int {
			return getColor(8);
		}
		
		public static function get GREEN_LIME():int {
			return getColor(9);
		}
		
		public static function get TEAL():int {
			return getColor(10);
		}
		
		public static function get CYAN_AQUA():int {
			return getColor(11);
		}
		
		public static function get BLUE_ROYAL():int {
			return getColor(12);
		}
		
		public static function get PINK():int {
			return getColor(13);
		}
		
		public static function get GREY():int {
			return getColor(14);
		}
		
		public static function get LIGHT_GREY():int {
			return getColor(15);
		}
		
		/*
0 white
1 black
2 blue (navy)
3 green
4 red
5 brown (maroon)
6 purple
7 orange (olive)
8 yellow
9 light green (lime)
10 teal (a green/blue cyan)
11 light cyan (cyan) (aqua)
12 light blue (royal)
13 pink (light purple) (fuchsia)
14 grey
15 light grey (silver)
		*/
	}

}